package com.hyperion.blog.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyperion.blog.admin.pojo.Permission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Hyperion
 * @date 2021/10/20
 */
@Repository
public interface PermissionMapper extends BaseMapper<Permission> {
    /**
     * 通过 adminId 返回该管理员所拥有的权限
     *
     * @param adminId 管理员id
     * @return 所有权限
     */
    List<Permission> findPermissionsByAdminId(@Param("adminId") long adminId);
}
